package co.yixiang.modules.order.order.entity.vo;

import cn.hutool.core.bean.BeanUtil;
import co.yixiang.modules.order.order.entity.domain.Order;
import co.yixiang.modules.order.order.entity.domain.OrderItem;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.List;

/**
 * 订单vo
 *
 */
@Data
@NoArgsConstructor
public class OrderVo extends Order {


    private static final long serialVersionUID = 5820637554656388777L;

    @ApiModelProperty(value = "订单商品项目")
    private List<OrderItem> orderItems;


    public OrderVo (Order order,List<OrderItem> orderItems){
        BeanUtil.copyProperties(order, this);
        this.setOrderItems(orderItems);
    }
}
